package com.chengjj.kings;

import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

/**
 * @Author: 成俊杰
 * @CreateDate: 2019/3/1
 * @Version: 1.0
 * @Description:
 * 启动SpringBoot 方式二：使用外置tomcat 启动
 * 注：用该方式启动时需要将pom.xml文件中<packaging>jar</packaging> 配置修改为<packaging>war</packaging>
 * 区别:先是启动Servlet服务器,服务器启动Springboot应用(springBootServletInitizer),然后启动IOC容器
 */
public class Kings_Web_Application extends SpringBootServletInitializer {
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(Kings_Application.class);
    }
}
